home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / swing / FilePane$8.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.3 KB  |  40 lines

  1. package sun.swing;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import java.io.File;
  5. import javax.swing.AbstractAction;
  6. import javax.swing.Action;
  7. import javax.swing.JFileChooser;
  8.  
  9. final class FilePane$8 extends AbstractAction {
  10.    private Action basicNewFolderAction;
  11.    // $FF: synthetic field
  12.    final FilePane this$0;
  13.  
  14.    FilePane$8(FilePane var1, String var2) {
  15.       super(var2);
  16.       this.this$0 = var1;
  17.       this.putValue("ActionCommandKey", "New Folder");
  18.       File var3 = this.this$0.getFileChooser().getCurrentDirectory();
  19.       if (var3 != null) {
  20.          this.setEnabled(FilePane.canWrite(var3));
  21.       }
  22.  
  23.    }
  24.  
  25.    public void actionPerformed(ActionEvent var1) {
  26.       if (this.basicNewFolderAction == null) {
  27.          this.basicNewFolderAction = FilePane.access$2100(this.this$0).getNewFolderAction();
  28.       }
  29.  
  30.       JFileChooser var2 = this.this$0.getFileChooser();
  31.       File var3 = var2.getSelectedFile();
  32.       this.basicNewFolderAction.actionPerformed(var1);
  33.       File var4 = var2.getSelectedFile();
  34.       if (var4 != null && !var4.equals(var3) && var4.isDirectory()) {
  35.          FilePane.access$1002(this.this$0, var4);
  36.       }
  37.  
  38.    }
  39. }
  40.